package com.wang.exam.service;

import com.wang.exam.mapper.MajorCoursesMapper;
import com.wang.exam.pojo.MajorCourse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class MajorCoursesService {
    @Autowired
    MajorCoursesMapper majorCoursesMapper;
    //查询专业考试
    public List<MajorCourse> getMajorCourses(Integer page,Integer rows){
        return majorCoursesMapper.getMajorCourses((page-1)*rows,rows);
    };
    //批量删除
    public int deleteMajorCourses(String[] ids){
        return majorCoursesMapper.deleteMajorCourses(ids);
    }
    //单独删除
    public int deleteMajorCourse(Map<String,Object> map){
        return majorCoursesMapper.deleteMajorCourse(map);
    }
    //添加
    public int addMajorCourse(Map<String,Object> map){
        return majorCoursesMapper.addMajorCourse(map);
    }
    //修改
    public int upMajorCourses(Map<String,Object> map){
        return majorCoursesMapper.upMajorCourses(map);
    }
    //搜索
    public int searchMajorCourse(Map<String,Object> map){
        return majorCoursesMapper.searchMajorCourse(map);
    }

    public int getCount(){
        return majorCoursesMapper.getCount();
    }
}
